import socket
import sys

def main():
	s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	s.connect(('127.0.0.1', 45000))
	s.send('EHLO\r\n'.encode())
	while True:
		buffer = s.recv(1024)
		if (buffer == b'EHLO\r\n'):
			s.send('NICK Octal\r\n'.encode())
		print(buffer)
		
	return 0
	
if __name__ == '__main__':
	sys.exit(main())